#ifndef _BASEBOARD_INFO_H_
#define _BASEBOARD_INFO_H_
#include "types.h"
#include <string>

class BaseboardInfo {
public:
    BaseboardInfo() : _length(0), _featureFlags(0), _chassisHandle(0), 
                      _boardType(0), _numberOfCoHandles(0), _coHandles(nullptr){}
    BaseboardInfo(UINT8 len, const std::string& manufacturer, const std::string& product, 
                  const std::string& version, const std::string& serialNumber) : 
                _length(len), _manufacturer(manufacturer), _product(product),
                _version(version), _serialNumber(serialNumber), _featureFlags(0), 
                _chassisHandle(0), _boardType(0), _numberOfCoHandles(0), _coHandles(nullptr){}
    ~BaseboardInfo();

    void        setGeneral(UINT8 len, const std::string &manufacturer, const std::string &product,
                            const std::string &version, const std::string &serialNumber);
    void        setAssetTag(const std::string &tag) { _assetTag = tag; }

    void        setFeatureFlags(UINT8 flags) { _featureFlags = flags; }

    void        setLocationInChassis(const std::string &str) { _locationInChassis = str; }

    void        setChassisHandle(UINT16 handle) { _chassisHandle = handle; }

    void        setBoardType(UINT8 type) { _boardType = type; }

    void        setNumberOfCoHandles(UINT8 num) { _numberOfCoHandles = num; }

    void        setCoHandles(UINT8 num, const UINT8 *handle);

    const char* printBaseBoardType();

    void        printBaseBoardHandles();

    void        print();

private:
    void        printFeatures();

private:
    UINT8       _length;
    std::string _manufacturer;
    std::string _product;
    std::string _version;
    std::string _serialNumber;
    std::string _assetTag;
    UINT8       _featureFlags;
    std::string _locationInChassis;
    UINT16      _chassisHandle;
    UINT8       _boardType;
    // Co: Contained Object
    UINT8       _numberOfCoHandles; 
    UINT16*     _coHandles;
};
#endif